package jdk8_new_date_api;

import java.time.LocalDateTime;
import java.time.Month;
import java.time.temporal.TemporalAdjuster;
import java.time.temporal.TemporalAdjusters;

public class Demo2 {

	public static void main(String[] args) {
		// 查询本季度的销量
		foo0();
		// 查询本月的销量
		foo1();
		// 查询本周的销量
		foo2();
	}

	private static void foo0() {

	}

	private static void foo1() {
		LocalDateTime now = LocalDateTime.now();
		LocalDateTime lastDayOfThisMonth = now.with(TemporalAdjusters.lastDayOfMonth());
		LocalDateTime fistDayOfThisMonth = now.with(TemporalAdjusters.firstDayOfMonth());

		System.out.println(fistDayOfThisMonth);
		System.out.println(lastDayOfThisMonth);

	}

	private static void foo2() {

	}

}
